package com.example.layuitest.service;

import com.example.layuitest.entity.Article;
import com.example.layuitest.entity.Pokemon;
import com.example.layuitest.mapper.ArticleMapper;
import com.example.layuitest.mapper.PokemonMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service

public class MyServiceImpl implements MyService{
    @Autowired
    PokemonMapper pokemonMapper;
    @Autowired
    ArticleMapper articleMapper;

    @Override
    public Pokemon getCount() {
        return pokemonMapper.getCount();
    }

    @Override
    public Integer getArticle() {
        return articleMapper.getArticle();
    }

    @Override
    public List<Article> getArticlePage(Map<String, Integer> param) {
        return articleMapper.getArticlePage(param);
    }

    @Override
    public Article getArticleByid(Integer id) {
        return articleMapper.getArticleByid(id);
    }

    @Override
    public Integer updateArticle(Article article) {
        return articleMapper.updateArticle(article);
    }

    @Override
    public Integer deleteArticleIds(Integer ids) {
        return articleMapper.deleteArticleIds(ids);
    }

}
